1. Field of the Invention
The present invention relates to a system call issue method and a debug system based on the system call issue method of issuing a system call for a real time Operating System (a real time OS) executed by an emulator when an application program using the real time OS is debugged.
2. Description of the Prior Art
Recently, it is becoming increasingly important for a debug system to have various functions for debugging the application programs accompanied with increasing of the number of systems using the application programs based on a real time Operating system (a real time OS). There is a function for issuing a system call of a real time OS as one of the functions. When an operator as users uses this function, it is possible to have services of real time OS, for example, the functions for changing the priority of a task, for terminating a task, for keeping a task in a wait state, for changing the flag pattern of an event flag, and the like. This causes a reduction in the debugging time period for the application programs using the real time OS.
For example, a debugging operation for a remote control processing is performed by using a key input handler and a remote control processing task. In this case, the key input handler issues a system call and transfers information indicating that any key has been selected and pushed by an operator, to the remote control processing task. When receiving the information as a message, the remote call processing task is executed in different ways according to the content of the received information.
In the debugging operation, there is a case to check whether or not an application program is correctly executed when a specified key is pushed. If an emulator issues no system call, it must be required for the remote control processing task to set the content of a program counter in a microcomputer, the contents of registers, the contents of memories used by a task, and the like.
On the contrary, when the emulator has the function to issue a system call, an operator inputs a command to issue the system call through a front end program executed in a host computer in order to perform the debugging operation described above. In addition, it can be easily realized by writing a script to issue a system call through the front end program that the test of the application programs are executed by pushing keys randomly.
FIG. 1 is a diagram showing a configuration of a debug system. In the diagram, the reference number 1 designates a host computer such as a personal computer or a work station in which a program is executed. This program is called as "a front end program" or "a front end" for short that provides debug commands by communicating with a target program 5 during debugging, processes data items transferred from a target board 4, and converts the data items so that users can recognize them and displays them.
FIG. 2 is a configuration diagram showing a conventional operation flow between the front end 1-1 and the target program 5 when a system call is issued during debugging. As shown in the diagram, the target program 5 comprises an operating system kernel (an OS kernel) 51, a user program 52, a debug task 53, and a communication processing program (not shown) for communicating with the host computer. When a user inputs a system call issue command into the front end 1-1 as the program that is executed by the host computer 1, the front end 1-1 transfers the system call issue command to the target program 5 by using an interrupt such as a serial interrupt.
When the interrupt is issued by the front end 1-1, the communication processing program in the target program 5 receives the data relating the system call issue command and initiates the operation of the debug task 53. The debug task whose operation has been initiated analyzes the data transferred from the front end 1-1. When there is a system call issue request in the data transferred from the front end 1-1, the debug task 53 sets parameters of the system call into registers and controls the operation flow so that the operation flow will jump to the system call process.
As described above, because the conventional system call issue method has the above described configuration and uses the serial interrupt process, it must be required to use a part of a hardware resource for debugging. In addition to this drawback, it must be required to include the communication processing program in a part of the user program in order to communicate between the host computer and the debug task. Furthermore, there is a drawback in which the area in memories ROM and RAM required for a stack region of debug tasks, a data region to control the debug tasks, and a data region to use the communication with the host computer is increased. In order to increase the size of an available memory region in the memories ROM and RAM, it must be required to eliminate the memory regions used for the debug task and the communication processing program to communicate with the host computer.
That is, in the actual fabrication process to fabricate application products after the completion of debugging, when the user program is written into a ROM after the completion of debugging, the debug task is no longer required. Because the debug task and the communication processing program to communicate with the host computer use approximately several tens K bytes, the available memory size in the ROM or the RAM is greatly decreased when they are written into the ROM or the RAM. Accordingly, in order to increase the available memory size in the ROM or the RAM, it is required to eliminate the memory region of the debug task, for example. However, there is a drawback that the operation to eliminate the debug task from the ROM or the RAM requires a long working time period and causes operation error.